At present, in a terminal device with an optical fingerprint device arranged under a screen, when a finger presses on the screen which is emitting light, the optical fingerprint device constructs a fingerprint image by signal strengths of reflected light resulting from valleys and ridges of the finger. However, the optical fingerprint device is susceptible to be influenced by environment during fingerprint collection, for example, when the terminal device is in a bright environment a signal exceeds a detection range of the fingerprint device and valid fingerprint image data may not be obtained; when the terminal device is in a relatively dark environment, intensities of light reflected by the valley and the ridge may tend to be consistent, so that the valid fingerprint image data may not be obtained either.